#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#define int long long
using namespace std;
 
void solve()
{
	int x, y, z; cin >> x >> y >> z;
	while (x || y || z)
	{
		if (x % 2 + y % 2 + z % 2 == 2)
		{
			cout << "NO" << endl;
			return;
		}
		x /= 2;
		y /= 2;
		z /= 2;
	}
	cout << "YES" << endl;
}
 
signed main()
{
	int t; cin >> t;
	while (t--) solve();
	return 0;
}
 
 
 
//1
//1
//1
//
//0011
//0010
//0110
//
//0 0111
//0 0011
//1 0110